package com.chen.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.chen.dao.TaskDao;
import com.chen.pojo.Task;
import com.chen.service.TaskService;

@Service
public class TaskServiceImpl implements TaskService {

	@Autowired
	private TaskDao taskDao;
	public List<Task> getTask() {
		
		return taskDao.findTask();
	}
	public void addTask(Task task) {
		taskDao.addTask(task);
		
	}
	public void deleteTask(String taskName) {
		taskDao.deleteTask(taskName);
		
	}
	public void updateTask(Task task) {
		taskDao.updateTask(task);
		
	}
	public Task getTaskByName(String taskName) {
		
		return taskDao.getTaskByName(taskName);
	}

}
